import request from '@/utils/request'

// 查询配送管理列表
export function listDistribution(query) {
  return request({
    url: '/wms/delivery/list',
    method: 'get',
    params: query
  })
}

// 查询配送管理详细
export function getDistribution(checkId) {
  return request({
    url: '/wms/delivery/' + checkId,
    method: 'get'
  })
}

// 新增配送管理
export function addDistribution(data) {
  return request({
    url: '/wms/delivery',
    method: 'post',
    data: data
  })
}

// 修改配送管理
export function updateDistribution(data) {
  return request({
    url: '/wms/delivery',
    method: 'put',
    data: data
  })
}

// 删除配送管理
export function delDistribution(checkId) {
  return request({
    url: '/wms/delivery/' + checkId,
    method: 'delete'
  })
}
export function updateStatus (id) {
  return request({
    url: '/wms/delivery/updateStatus',
    method: 'put',
    params: {
      id
    }
  })
}
export function updateStatus2 (id) {
  return request({
    url: '/wms/delivery/updateStatus2',
    method: 'put',
    params: {
      id
    }
  })
}
